#ifndef _network_Client_hpp_
#define _network_Client_hpp_

/** \file Client.hpp Client for network
 *  \author Micha Begert
 *  \created  $Sa 15 Sep 21:48:00 pm CEST 2007 $
 *  \modified $Sa 06 Okt 05:27:58 pm CEST 2007 schwadri@SchwadriLaptop$
 */

//#include "../core/types.hpp"
#include <string>

#include "Types.hpp"

namespace network {

    using namespace core::types;
    /** \brief A Client
     *
     *  Each Client is a representation of a physical existing computer somewhere in the void.
     *  A Client may own multiple players.
     */
    class Client
    {
    public:
        typedef sint8 Id;   ///< the type of a client id

        // Getter / Setter
        /** \brief gets the ClientId.*/
        Id                  ClientId() const              { return m_cid; }
        /** \brief gets the ClientIp.*/
        Address::ip_type    ClientIp() const              { return m_sysAdr.Ip(); }
        /** \brief gets the ClientPort.*/
        Address::port_type  ClientPort() const            { return m_sysAdr.Port(); }

        bool operator<(const Client& c)const{return ClientId()<c.ClientId();}

        /** \name Id constants *///@{
        static const Id     INVALID        = -1;
        static const Id     SERVER         =  0;
        //@

    private:

        Client();
        Client(Id cid);

        Id          m_cid;
        Address     m_sysAdr;
    };
} // namespace network

#endif // _network_Client_hpp_
